import type { GiteeElements } from '../../../../../../../../types/constants/personalization/gitee'
import { BaseService } from '../../../../../../../../lib/abstract/base_service'
import {
  PAGE_ELEMENTS,
  SUPPORTED_PLATFORMS,
} from '../../../../../../../../types/constants'

export class GiteeCommitsPage extends BaseService {
  readonly id: string = 'gitee_commits_page'
  readonly name = 'giteeCommitsPage'
  elements: GiteeElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GITEE]
  private static instance: GiteeCommitsPage

  /**
   * 获取单例实例
   */
  public static getInstance(): GiteeCommitsPage {
    if (!GiteeCommitsPage.instance) {
      GiteeCommitsPage.instance = new GiteeCommitsPage()
    }
    return GiteeCommitsPage.instance
  }

  init(): void {}

  getMainStyles(): string {
    return `
.commit-list .commit-group {
  border: 1px solid #e3e9ed !important;
  margin: 10px 0 !important;
}
`
  }
}
